1. Field of the Invention
The invention generally relates to host controllers such as USB (Universal Serial Bus) host controllers and related methods, and in particular to test circuits and methods in such host controllers.
2. Description of the Related Art
USB was originally developed in 1995 to define an external expansion bus which facilitates the connection of additional peripherals to a computer system. The USB technique is implemented by PC (Personal Computer) host controller hardware and software and by peripheral friendly master-slave protocols and achieves robust connections and cable assemblies. USB systems are extendable through multi-port hubs.
In USB systems, the role of the system software is to provide a uniformed view of the input/output architecture for all applications software by hiding hardware implementation details. In particular, it manages the dynamic attach and detach of peripherals and communicates with the peripheral to discover its identity. During run time, the host initiates transactions to specific peripherals, and each peripheral accepts its transactions and response accordingly.
Hubs are incorporated to the system to provide additional connectivity for USB peripherals, and to provide managed power to attached devices. The peripherals are slaves that must react to request transactions sent from the host. Such request transactions include requests for detailed information about the device and its configuration.
While these functions and protocols were already implemented in the USB 1.1 specification, this technique was still improved in order to provide a higher performance interface. FIG. 1 illustrates an example USB 2.0 system that comprises a host controller 100, a number of USB devices 115, 120, 125, 130, and two hubs 105, 110. In the system of FIG. 1, the hubs 105, 110 are introduced for increasing connectivity, but in other USB 2.0 systems, the USB devices can be connected directly to the host controller 100.
As mentioned above, USB 2.0 provides a higher performance interface, and the speed improvement may be up to a factor of 40. Moreover, as apparent from FIG. 1, USB 2.0 is backwards compatible with USB 1.1 because it allows for connecting USB 1.1 devices 120, 125, 130 to be driven by the same host controller 100. There may even be used USB 1.1 hubs 110.
As can be seen from FIG. 1, a USB 1.1 device 120 can be connected directly to a USB 2.0 hub 105. Moreover, it can also be connected directly to the host controller 100. This is made possible by the capability of USB 2.0 host controllers and hubs to negotiate higher as well as lower transmission speeds on a device-by-device basis.
Turning now to FIG. 2, the system software and hardware of a USB 2.0 system is illustrated. The system components can be organized hierachially by defining several layers as shown in the figure.
In the upper most layer, the client driver software 200 executes on the host PC and corresponds to a particular USB device 230. The client software is typically part of the operating system or provided with the device.
The USB driver 205 is a system software bus driver that abstracts the details of the particular host controller driver 210, 220 for a particular operating system. The host controller drivers 210, 220 provide a software layer between a specific hardware 215, 225, 230 and the USB driver 205 for providing a driver-hardware interface.
While the layers discussed so far are software implemented, the upper most hardware component layer includes the host controllers 215, 225. These controllers are connected to the USB device 230 that performs the end user function. Of course, for one given USB device, the device is connected to either one of the host controllers 215, 225 only.
As apparent from the figure, there is one host controller 225 which is an enhanced host controller (EHC) for the high speed USB 2.0 functionality. This host controller operates in compliance with the EHCI (Enhanced Host Controller Interface) specification for USB 2.0. On the software side, host controller 225 has a specific host controller driver (EHCD) 220 associated.
Further, there are host controllers 215 for full and low speed operations. The UHCI (Universal Host Controller Interface) or OHCI (Open Host Controller Interface) are the two industry standards applied in the universal or open host controllers (UHC/OHC) 215 for providing USB 1.1 host controller interfaces. The host controllers 215 have assigned universal/open host controller drivers (UHCD/OHCD) 210 in the lowest software level.
Thus, the USB 2.0 compliant host controller system comprises driver software and host controller hardware which must be compliant to the EHCI specification. While this specification defines the register-level interface and associated memory-resident data structures, it does not define nor describe the hardware architecture required to build a compliant host controller.
Referring now to FIG. 3, the hardware components of a common motherboard layout are depicted. The basic elements found on a motherboard may include the CPU (Central Processing Unit) 300, a northbridge 305, a southbridge 310, and system memory 315. The northbridge 305 usually is a single chip in a core-logic chipset that connects the processor 300 to the system memory 315 and the AGP (Accelerated Graphic Port) and PCI (Peripheral Component Interface) buses. The PCI bus is commonly used in personal computers for providing a data path between the processor and peripheral devices like video cards, sound cards, network interface cards and modems. The AGP bus is a high-speed graphic expansion bus that directly connects the display adapter and system memory 315. AGP operates independently of the PCI bus. It is to be noted that other motherboard layouts exist that have no northbridge in it, or that have a northbridge without AGP or PCI options.
The southbridge 310 is usually the chip in a system core-logic chipset that controls the IDE (Integrated Drive Electronics) or EIDE (Enhanced IDE) bus, the USB bus, that provides plug-and-play support, controls a PCI-ISA (Industry Standard Architecture) bridge, manages the keyboard/mouse controller, provides power management features, and controls other peripherals.
USB host controllers and other host controllers in southbridges or I/O hubs are hardware components that are extremely complex in structure. Thus, there may occur faults in the operation of such host controllers, and it is usually difficult to resolve whether such faults are caused by hardware components or by the software driver or any other hardware or software components.
For this reason, host controllers, hubs, and other functions usually have some testing mechanisms that may allow for performing static or dynamic electrical tests. Such mechanisms are however difficult to implement and the tests hard to accomplish. For instance, USB 1.1 compliant controllers need a special software setup to stimulate a physical device in a way that it can be electrically characterized. With USB 2.0 compliant host controllers, several test modes are supported to facilitate compliance testing. However, these test modes solely relate to the USB 2.0 high-speed data traffic.
It has therefore been found to be disadvantageous in the prior art systems, in particular in USB systems, that many different test mechanisms need to be provided in many cases, and each of the diagnostic functions has to comply with its own implementation rules. Specifically in USB 2.0 enhanced host controllers, testing of full and low speed data transfers is still subject to the restrictions and disadvantages of USB 1.1 compliant techniques.